cpupool: Avoid race when moving cpu between cpupools
authorJuergen Gross <juergen.gross@ts.fujitsu.com>
Fri, 25 Feb 2011 11:28:15 +0000 (11:28 +0000)
committerJuergen Gross <juergen.gross@ts.fujitsu.com>
Fri, 25 Feb 2011 11:28:15 +0000 (11:28 +0000)
commit53582e3da009e5fa440cf47280bda2c1f92f2dfa
tree38f3718ee885fc7befe7b21b9cc93df30bcd5460
parenta0f5d3f3b7cdb44bb5d8f657efa1fa46008359ad
cpupool: Avoid race when moving cpu between cpupools

Moving cpus between cpupools is done under the schedule lock of the
moved cpu.  When checking a cpu being member of a cpupool this must be
done with the lock of that cpu being held.  Hot-unplugging of physical
cpus might encounter the same problems, but this should happen only
very rarely.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit.c
xen/common/schedule.c